<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>Title</title>
    <link rel="shortcut icon"  th:href="@{/static/favicon.ico}"/>
    <link rel="stylesheet" href="/layui/css/layui.css"  media="all">
    <script type="text/javascript" src="/layui/jquery-3.5.1.min.js"></script>
    <script src="/layui/layui.js" charset="utf-8"></script>
    <script>
        layui.use('table', function(){
            layui.$('.addIndicators').click(function () {

                var supplierId =  layui.$("#customer").val();
                //alert(supplierId)
                var productId = layui.$("#product").val();
                parent.layer.open({
                    title:'产品指标添加',
                    type:2,
                    content:'/customerInformation/addIndicators?supplierId='+supplierId+'&productId='+productId,
                    area: ['1200px', '600px'],
                    shade: [0.3, '#393D49'],
                    shadeClose:false,
                    moveOut:true,
                })
                return false;
            }); })
    </script>
</head>
<body>
<input id="customer" type="hidden" th:value="${customerId}">
<input id="product" type="hidden" th:value="${id}">
<div id="bigdiv" style="margin: auto; width: 1100px">
 <form class="layui-form layui-form-pane" action="">
      <fieldset class="layui-elem-field" style="margin-top: 20px; padding-left: 20px" th:each="chemicalIndex:${product.chemicalIndexList}">
                   <legend>化学指标</legend>
          <button  class="layui-btn layui-btn-sm addIndicators">添加化学指标</button>
                   <div class="layui-form-item">
                       <div class="layui-inline">
                           <label class="layui-form-label">元素</label>
                           <div class="layui-input-inline">
                               <input type="text" readonly="readonly" th:value="${chemicalIndex.dictionary.value}" autocomplete="off" class="layui-input">
                           </div>
                       </div>
                       <div class="layui-inline">
                           <label class="layui-form-label">指标名</label>
                           <div class="layui-input-inline">
                               <input type="text" readonly="readonly" th:value="${chemicalIndex.name}" autocomplete="off" class="layui-input">
                           </div>
                       </div>
                       <div class="layui-inline">
                       <label class="layui-form-label">数值</label>
                       <div class="layui-input-inline">
                           <input type="text" readonly="readonly" th:value="${chemicalIndex.numericalValue}" autocomplete="off" class="layui-input">
                       </div>
                       </div>
                       <div class="layui-inline">
                           <label class="layui-form-label">指标方向</label>
                           <div class="layui-input-inline">
                               <input type="text" readonly="readonly" th:value="${chemicalIndex.direct}" autocomplete="off" class="layui-input">
                           </div>
                       </div>
                       <div class="layui-inline">
                           <label class="layui-form-label">备注</label>
                           <div class="layui-input-inline">
                               <input type="text" readonly="readonly" th:value="${chemicalIndex.remarks}" autocomplete="off" class="layui-input">
                           </div>
                       </div>
                       <button type="button" class="layui-btn layui-btn-primary layui-btn-sm">查看详情</button>
                   </div>
      </fieldset>
     <fieldset class="layui-elem-field" style="margin-top: 20px; padding-left: 20px" th:each="physicalIndex:${product.physicalIndexList}">
         <legend>物理指标</legend>
         <button  class="layui-btn layui-btn-sm addIndicators">添加物理指标</button>
         <div class="layui-form-item">
             <div class="layui-inline">
                 <label class="layui-form-label">单位</label>
                 <div class="layui-input-inline">
                     <input type="text" readonly="readonly" th:value="${physicalIndex.dictionary.value}" autocomplete="off" class="layui-input">
                 </div>
             </div>
             <div class="layui-inline">
                 <label class="layui-form-label">指标名</label>
                 <div class="layui-input-inline">
                     <input type="text" readonly="readonly" th:value="${physicalIndex.name}" autocomplete="off" class="layui-input">
                 </div>
             </div>
             <div class="layui-inline">
                 <label class="layui-form-label">数值</label>
                 <div class="layui-input-inline">
                     <input type="text" readonly="readonly" th:value="${physicalIndex.numericalValue}" autocomplete="off" class="layui-input">
                 </div>
             </div>
             <div class="layui-inline">
                 <label class="layui-form-label">指标方向</label>
                 <div class="layui-input-inline">
                     <input type="text" readonly="readonly" th:value="${physicalIndex.direct}" autocomplete="off" class="layui-input">
                 </div>
             </div>
             <div class="layui-inline">
                 <label class="layui-form-label">备注</label>
                 <div class="layui-input-inline">
                     <input type="text" readonly="readonly" th:value="${physicalIndex.remarks}" autocomplete="off" class="layui-input">
                 </div>
             </div>
             <button type="button" class="layui-btn layui-btn-primary layui-btn-sm">查看详情</button>
         </div>
     </fieldset>
 </form>
</div>
</body>

</html>